<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta charset="utf-8">
<title>材料采购质检</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../res/css/layui.css" media="all">
<link rel="stylesheet" href="../../res/css/cst/snproduction.css"
	media="all">
<script type="text/javascript" src="../../res/js/jquery-1.11.2.min.js"></script>
<style>
#qualityUpdate tr td, #qualityUpdate tr th {
	text-align: center;
}
	.materNumber {
	width: 200px;
	height: 28px;
	border: none;
	text-align: center;
}
</style>
</head>
<body>
	<div class="demoTable" style="margin-left: 20px; margin-top: 10px;">
		开始时间：
		<div class="layui-inline">
			<input class="layui-input" style="height: 32px;" id="date"
				placeholder="yyyy-MM-dd" autocomplete="off">
		</div>
		-截止时间:
		<div class="layui-inline">
			<input class="layui-input" id="time" style="height: 32px;"
				placeholder="yyyy-MM-dd" autocomplete="off">
		</div>
		<button class="layui-btn layui-btn-sm" data-type="reload"
			id="selectButton">搜索</button>
	</div>

	<table class="layui-table"
		lay-data="{ url:'../../maquality/findAll.action', page:true, id:'idTest'}"
		lay-filter="demo">
		<thead>
			<tr>
				<th lay-data="{type:'checkbox', fixed: 'left'}"></th>
				<th lay-data="{field:'mqId',align:'center',width:'220'}">质检编号</th>
				<th
					lay-data="{field:'mqCount',sort: true, align:'center',width:'120'}">质检总数量</th>
				<th lay-data="{field:'mqNotcount', align:'center',width:'130'}">未通过总数量</th>
				<th lay-data="{field:'mqAlready', align:'center',width:'120'}">通过总数量</th>
				<th lay-data="{field:'mqProbability', align:'center',width:'100'}">质检率</th>
				<th lay-data="{field:'optime', align:'center',width:'160'}">操作时间</th>
				<th
					lay-data="{field:'oper', align:'center',width:'133',templet:'#imgTpl'}">质检状态</th>
				<th
					lay-data="{fixed: 'right',fixed: 'right',width:'225', align:'center', toolbar: '#barDemo'}">操作</th>
			</tr>
		</thead>
	</table>


	<script type="text/javascript" id="imgTpl">
	{{# if(d.oper == 0) { }}
		<div>等待质检</div>
	{{# }else if(d.oper == 1) { }}
		<div>质检通过等待入库</div>
 	{{# }else if(d.oper == 2) { }}
		<div>质检未通过</div>
 	{{# }else if(d.oper == 3) { }}
		<div>已入库</div>
 	{{# }}}
</script>

	<script type="text/html" id="barDemo">
	{{# if(d.oper == 0) { }}
		<button class="layui-btn layui-btn-xs layui-btn-normal" lay-event="Quality">立即质检</button>
		<button class="layui-btn layui-btn-xs layui-btn-warm layui-btn-disabled">入库</button>
	{{# }else if(d.oper == 1) { }}
		<button class="layui-btn layui-btn-xs layui-btn-normal layui-btn-disabled">质检完成</button>
		<button class="layui-btn layui-btn-xs layui-btn-warm" lay-event="make">入库</button>
 	{{# }else if(d.oper == 2) { }}
		<button class="layui-btn layui-btn-xs layui-btn-normal" lay-event="Quality">质检未通过</button>
		<button class="layui-btn layui-btn-xs layui-btn-warm layui-btn-disabled">入库</button>
 	{{# }else if(d.oper == 3) { }}
		<button class="layui-btn layui-btn-xs layui-btn-normal layui-btn-disabled">质检完成</button>
		<button class="layui-btn layui-btn-xs layui-btn-warm layui-btn-disabled">已入库</button>
 	{{# }}}
	
	<button id="fix" class="layui-btn layui-btn-xs" lay-event="cxdetail">查看详情</button>
	</script>

	<!-- 查看详情 -->
	<div id="qualityDiv" style="display: none;">
		<table class="layui-table"
			lay-data="{ url:'../../maqudetail/findAll.action', page:true, id:'qualityTable'}"
			lay-filter="qualityDemo">
			<thead>
				<tr>
					<th lay-data="{field:'mdId',align:'center',width:'225'}">质检编号</th>
					<th lay-data="{field:'oper', align:'center',width:'245'}">材料名称</th>
					<th lay-data="{field:'mdCount',sort: true, align:'center',width:'80'}">质检数量</th>
					<th lay-data="{field:'mdNotcount', align:'center',width:'80'}">未通过</th>
					<th lay-data="{field:'mdAlready', align:'center',width:'80'}">已通过</th>
					<th lay-data="{field:'mdProbability', align:'center',width:'80'}">通过率</th>
					<th lay-data="{field:'optime', align:'center',width:'200'}">操作时间</th>
				</tr>
			</thead>
		</table>
	</div>
	
	<div id="qualityUpdateDiv" style="display: none;">
		<div class="demoTable" style="margin-left: 20px; margin-top: 10px;">
			<button id="fix" class="layui-btn  layui-btn-sm" data-type="findBao">确认保存</button>
			<button class="layui-btn layui-btn-danger layui-btn-sm" onclick="manuExit()">取消</button>
		</div>
		<table class="layui-table" lay-filter="qualityUpdateDemo" id="qualityUpdate">
			<thead>
				<tr>
					<th lay-data="{field:'qdId',align:'center',width:'225'}">质检编号</th>
					<th lay-data="{field:'oper', align:'center',width:'230'}">材料名称</th>
					<th lay-data="{field:'qdCount',sort: true, align:'center',width:'100'}">质检数量</th>
					<th lay-data="{field:'qdNotcount', align:'center',width:'80'}">未通过</th>
					<th lay-data="{field:'qdAlready', align:'center',width:'80'}">已通过</th>
					<th lay-data="{field:'qdProbability', align:'center',width:'80'}">通过率</th>
					<th lay-data="{field:'optime', align:'center',width:'200'}">操作时间</th>
					
				</tr>
			</thead>
			<tbody id="qualityBody">
				
			</tbody>
		</table>
	</div>
	<script src="../../res/layui.all.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../res/js/cst/snmaquality.js"></script>
</body>
</html>